package org.quincy.rock.core.dao;

import org.quincy.rock.core.dao.annotation.JoinTable;
import org.quincy.rock.core.dao.annotation.PrimaryKey;
import org.quincy.rock.core.dao.annotation.Table;
import org.quincy.rock.core.vo.BaseEntity;

@Table(name="t_user",alias = "u")
@JoinTable(name = "t_dept", alias = "d", onExpr = "u.f_dept_id=d.f_id", extraColumns = { "f_descr", "f_other" })
public class Entity extends BaseEntity<Long> {
	/**
	 * serialVersionUID。
	 */
	private static final long serialVersionUID = -9146290789116371771L;

	@PrimaryKey("f_id")
	private Long id;

	/** 
	 * id。
	 * @see org.quincy.rock.core.vo.Vo#id()
	 */
	@Override
	public Long id() {
		return id;
	}

	/** 
	 * id。
	 * @see org.quincy.rock.core.vo.Vo#id(java.lang.Object)
	 */
	@Override
	public Entity id(Long id) {
		this.id = id;
		return this;
	}

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}
}
